randn('state',SEED1)  %For draws from normal
rand('state',SEED1)   %For draws from uniform

%Create draws

if DRAWTYPE ~= 5
   disp('Creating draws.');
   DR=makedraws;   %NMEMxNPxNV
   if NTAKES == 1
      DR=permute(DR,[3,2,1]);   %To make NVxNPxNDRAWS
   else 
      MDR=memmapfile(PUTDR,'Format',{'double',[NDRAWS,NP,NV],'drs'});
   end
end

if NV>0 & NF>0
   param=[F;B(IDV(:,2)~=5,1);W];
elseif NV>0 & NF==0
   param=[B(IDV(:,2)~=5,1);W];
elseif NV==0 & NF>0;
   param=F;
else
   disp('Model has no explanatory variables.');
   disp('IDV and IDF are both empty.');
   disp('Program terminated.');
   return
end